<?php

class Core_Action_Admin_Appearance_Menu_Configure extends Action_Admin
{
	function execute($request)
	{
		$id = $request -> getParam('id');

		$item = Document::factory('core/menu', $id);

		if ($request -> isGet() && $id && $item -> load())
		{

		}

		if ($request -> isPost() && $form -> isValid($_POST))
		{
			$data = $form -> getData();

			$item -> title = $data['title'];

			$item -> css_class = $data['css_class'];

			$item -> css_id = $data['css_id'];

			$item -> save();
		}

		$request -> response = View::render($script = 'core/html/admin/appearance/menu/configure', $data = array('menu' => $id));
	}

}
